Skip to content

Integrate style rules from ALLinter into YAML checker#44

Merged
nonprofittechy merged 3 commits into
mainfrom
migrate-allinter
Jun 1, 2026
Merged

Integrate style rules from ALLinter into YAML checker#44
nonprofittechy merged 3 commits into
mainfrom
migrate-allinter

Conversation

@nonprofittechy
Copy link
Copy Markdown
Member

@nonprofittechy nonprofittechy commented Jun 1, 2026

  1. Makes it easier to run from command line
  2. Lets us run style checks from ci/cd for appropriate interviews; also simplifies integration with the Weaver

Copied over all of the pure style rules, but also there was some mismatch in accessibility checks which were duplicated between the two repos.

Style checks are only run when explicitly requested with the --style flag. Using --style-llm also runs LLM-powered checks for readability that deterministic rules aren't flexible enough for. When using --style-llm, developer can either use environment variables for OPENAI_BASE_URL, _MODEL, and _API_KEY, or pass as flags.

This is designed to be an importable feature for the existing Dashboard linter, rather than a duplicate copy of those rules.

…un from commandline; also allows calling from within ci/cd
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates Assembly Line interview “style” lint rules into dayamlchecker, making them runnable from the CLI and enabling CI/CD style checks (including optional LLM-backed rules), while also expanding accessibility parity coverage.

Changes:

  • Add opt-in deterministic style linting plus optional LLM-backed style findings (CLI flags + Python helper).
  • Add interview-level parity checks (missing question id, multiple mandatory blocks, missing common metadata fields).
  • Expand accessibility lint rules/messages and add parity tests; package YAML data files needed for style rules.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/test_yaml_structure.py Adds parity tests for new interview-level + accessibility rules; updates “valid question” fixture.
tests/test_style.py New test suite covering opt-in style checks, severities, LLM configuration behavior, and CLI integration.
src/dayamlchecker/yaml_structure.py Wires style/interview-level linting into the main parser flow; adds CLI flags and a style-only helper.
src/dayamlchecker/style.py New style lint engine (deterministic + optional LLM rules) and prompt/data loading.
src/dayamlchecker/messages.py Adds new FindingClass.STYLE, new message IDs, and message definitions for accessibility/style/interview-level findings.
src/dayamlchecker/accessibility.py Adds multiple new accessibility checks (labels, choices, validation guidance, HTML rules, etc.).
src/dayamlchecker/data/plain_language_replacements.yml Adds plain-language replacement dictionary used by style linting.
src/dayamlchecker/data/interview_linter_prompts.yml Adds LLM prompt templates/rules for style linting.
src/dayamlchecker/init.py Exposes a small public API surface for Python consumers (including style helper).
README.md Documents style linting usage via CLI and Python helper.
pyproject.toml Ensures new YAML data files are included in the package distribution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/dayamlchecker/accessibility.py Outdated
Comment thread tests/test_yaml_structure.py
Comment thread src/dayamlchecker/accessibility.py Outdated
Comment thread tests/test_yaml_structure.py
@nonprofittechy nonprofittechy changed the title Integrate linter rules into YAML checker Integrate style rules from ALLinter into YAML checker Jun 1, 2026
  - contractions in user-facing text, excluding common “I don’t know”
  - slash-separated alternatives, with exceptions for pronoun sets, N/A, and URL path fragments
  - field labels starting with enter, write, or list
  - title-case field labels as INFO, narrowed after sample validation to avoid page-title noise
  - Other appearing before the end of any choice list
  - language fields using dropdowns or non-ISO choice values
  - “preferred pronouns”, required pronoun fields, gender Other, and binary-only gender choices
@nonprofittechy
Copy link
Copy Markdown
Member Author

This is mostly a straight lift of the existing linter, but it's large enough I won't expect a code review. Any suggestions welcome; this is totally opt-in at the moment, and has been validated manually against a sample of ~ 70 of our repos.

@nonprofittechy nonprofittechy merged commit b693b59 into main Jun 1, 2026
4 checks passed
@nonprofittechy nonprofittechy deleted the migrate-allinter branch June 1, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants